
const Mock = require('mockjs')
// mock 可接受三个参数：url地址,type请求类型,data数据
const datalist = Mock.mock({
    'data|10': [
        {
            'id|+1':1,
            'name|1-5':'@cname',
            'age|18-60':1,
            'sex|1':['男','女'],
            'address':'@county(true)'
        }
    ]
})

console.log(datalist);

module.exports = [
    {
        method:'post',
        url:'/data/list',
        response:({boby}) =>{
            console.log(boby);
            
            return {
                code:200,
                msg:'success',
                data:datalist
            }
        }
    }
]